<!DOCTYPE html>
<html>
<head>
	<title>属性</title>
</head>
<body>
<script type="text/javascript">
	
/*

	1. 属性可以使用[]进行解析
	
*/

let key = 'nihao';
let obj = {
	[key]: '你好',
	[key + 'ok']: '你好， ok'
}
console.log(obj[key]);
console.log(obj[key + 'ok']);

</script>
</body>
</html>